-
Notifications
You must be signed in to change notification settings - Fork 196
fix(core): fix bug loading of .redocly.lint-ignore.yaml in browser environments
#2489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 4a53e67 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767804621 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767807792 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767866050 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767870619 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767871282 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767882364 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
.redocly.lint-ignore.yaml in browser environments
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767884148 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
.redocly.lint-ignore.yaml in browser environments.redocly.lint-ignore.yaml in browser environments
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767894238 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1767895703 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/[email protected]
# or
npm install @redocly/[email protected]
# or
npm install @redocly/[email protected] |
tatomyr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments. Will take another round soon.
| @@ -0,0 +1,2 @@ | |||
| rules: | |||
| operation-operationId: error | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add yet another rule (but don't ignore it) so we can be sure it ignores only what's supposed to be ignored?
|
|
||
| import type { RawUniversalConfig } from './types.js'; | ||
|
|
||
| function isUrl(ref: string): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we have something similar to this (isAbsolutePath? Maybe it needs to be adjusted.)
Could you check the codebase?
| for (const fileName of Object.keys(ignore)) { | ||
| const resolvedFileName = isUrl(fileName) ? fileName : resolvePath(configDir, fileName); | ||
|
|
||
| ignore[resolvedFileName] = ignore[fileName]; | ||
|
|
||
| for (const ruleId of Object.keys(ignore[fileName])) { | ||
| ignore[fileName][ruleId] = new Set(ignore[fileName][ruleId]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this mapper? Cannot we just use whatever we've resolved?
What/Why/How?
Fixed loading of
.redocly.lint-ignore.yamlin browser environments (Reunite).Reference
#86
Related PR
Testing
Screenshots (optional)
Check yourself
Security